<div class="div_page">
<div class="div_page_inner">

<div class="div_title"> <?php
  echo phrase::__("Phrase translation"); ?>
</div>
<div>&nbsp;</div>

<form method="post"> 
  <div> 
  <table style="width:880px;">
  <tr>
    <td style="text-align:left;"> <?php
      foreach ($this->langs as $key=>$lang) { ?>
        <a href="<?php echo helper::make_url("editlang",$key); ?>"><?php
        echo $lang; ?></a> <?php
      } ?> (<?php 
      echo phrase::__("Editting"); ?>: <?php 
      echo $this->langs[$this->editlang]; ?>)
    </td>
    <td style="text-align:right;">
      <button class="btn_dt_phrases" type="submit"><?php 
      echo phrase::__("Save all phrases"); ?>
      </button>    
    </td>
  </tr>
  </table>
  </div>

  <div> <?php
    foreach ($this->phrases as $phrase_uk=>$translations) {
      $translation = trim($translations[$this->editlang]);
      if (strlen($translation)==0 || $translation=="???") { ?>
        <input class="inp_dt_phrase_uk" readonly name="uks[]"
          onclick="this.select();"
          value="<?php echo $phrase_uk; ?>"/>
        <input class="inp_dt_phrase" name="trans[]"
          value="<?php echo $translation; ?>"/>
        <div>&nbsp;</div> <?php
      }
    }  
    foreach ($this->phrases as $phrase_uk=>$translations) {
      $translation = trim($translations[$this->editlang]);
      if (strlen($translation)>0 && $translation!="???") { ?>
        <input class="inp_dt_phrase_uk" readonly name="uks[]"
          onclick="this.select();"
          value="<?php echo $phrase_uk; ?>"/>
        <input class="inp_dt_phrase" name="trans[]"
          value="<?php echo $translation; ?>"/>
        <div>&nbsp;</div> <?php
      }
    } ?>
    
    <div style="text-align:right;">
      <button class="btn_dt_phrases" type="submit"><?php 
      echo phrase::__("Save all phrases"); ?>
      </button>
    </div>
  </div>
</form>

</div>
</div>
